__author__ = 'CLINUX'
#coding=utf-8

name = 'Swaroop' # This is a string object
if name.startswith('Swa'):
    print 'Yes, the string starts with "Swa"'
if 'p' in name:
    print 'Yes, it contains the string "p"'
if name.find('war') != -1:
    print 'Yes, it contains the string "war"'
delimiter = '---'
mylist = ['Brazil', 'Russia', 'India', 'China']
print delimiter.join(mylist)

#import socket
#import thread,threading
#
#sockIndex = 1
#
#def connToServer ():
#    global sockIndex
#    #创建一个socket连接到127.0.0.1:8081，并发送内容
#    conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#    conn.connect(("192.168.1.149", 8888))
#    conn.send("hi,I'm NO."+ str(sockIndex))
#    print sockIndex
#    sockIndex = sockIndex + 1
#    while True:
#    #等待服务端返回数据，并输出
#        rev = conn.recv(1024)
#        print 'get server msg:' + str(rev)
#        break
#threads = []
#times = 20000
##并发
#for i in range(0,times):
#    t = threading.Thread(target=connToServer())
#    threads.append(t)
#for i in range(0,times):
#    threads[i].start()
#for i in range(0,times):
#    threads[i].join()


